#include<stdio.h>
#define F 'F'
#define T 'T'
void getGrades(char corect_answer[], int student_answer [][5],int scores[]);

int main (){
	int  student_answer [6][5];
	
	int i, j, sum, scores[6];
	
	char  corect_answer[]= {T , T , F , F , T};
	
	printf("Enter the students' answers \n");
	
	for(i=0; i<6; i++)
		for(j=0; j<5; j++){
			
		scanf("%c",&student_answer[i][j]);	
		}
	 
	 getGrades(corect_answer, student_answer, scores);
	 printf("Students#     Grade out of 25\n");
	 
	for(i=0; i<6; i++)
	 printf("%d                          %d", i+1, scores[i]);
	 
}

void getGrades(char corect_answer[], int student_answer [][5],int scores[]){
	int i, j,sum=0;
	
	for (i=0; i<6 ; i++){
		sum=0;
		for (j=0; j<5 ;j++){
			if(student_answer[i][j] == corect_answer[j])
			sum+=5;	
		}
	scores[i]=sum;
	}
} 
